package homework.homework01;

public class Programmer extends Employee {//程序员类
    private String lang = "java";//编程语言，默认为java

    //有参构造
    public Programmer(int no, String name, int age, int sal, String lang) {
        super(no, name, age, sal);
        this.lang = lang;
    }

    public Programmer(String lang) {
        this.lang = lang;
    }

    //无参构造
    public Programmer() {
    }

    //get and set 获取和修改编程语言
    public String getLang() {
        return lang;
    }

    public void setLang(String lang) {
        this.lang = lang;
    }

    public String getInfo() {
        return super.getInfo() + " 编程语言：" + lang;
    }
}
